<template>
  <div>
    {{name}}---{{address}}
  </div>
</template>

<script>
export default {
  name:'School',
  data(){
    return {
      name:'xxx学校',
      address:'china'
    }
  },
  methods: {
    
  },
  mounted() {
    this.$bus.$on('hello',(data)=>{
      console.log('School收到了数据',data)
    })
  },
  beforeDestroy() {
    this.$bus.$off('hello')
  },

}
</script>